package com.datasure.application.req.command;

import com.datasure.types.IntegerId;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @author zhangxiaolong
 * @ClassName DeviceRegisterCommand.java
 * @Description 客户端信息上报注册
 * @createTime 2022年01月14日 16:35:00
 */
@Data
public class DeviceRegisterCommand {
//    @NotNull(message = "设备id不能为空")
//    private IntegerId deviceId;

    @NotNull(message = "deviceUniqueId 设备唯一标识不能为空")
    private String deviceUniqueId;
//    private Integer deviceState;

//    private Integer deviceMarkDel;

    @Max(value = 10, message = "mac地址长度过大")
    private String deviceMac;

    @NotNull(message = "设备ip不能为空")
    @Pattern(regexp = "((25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))\\.){3}(25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))", message = "非正确ip格式")
    private String deviceIp;

    @Max(value = 100, message = "设备名称长度不能大于100")
    private String deviceClientComputerName;

    private Integer deviceIsStandby;

    private Integer deviceStandbyId;

    private Integer deviceLicenseFlag;

    private Integer deviceClientSystype;

    private String deviceClientSysversion;

    private String deviceClientVersion;

    private Integer deviceClientRegister;

    private Date deviceClientSteupDateTime;

    private String deviceClientWorkgroup;

    private String fcConnectionStr;

    private String iscsiConnectionStr;

    private Date offlineTime;

    private Integer deviceSortIndex;

    private String deviceRemark;

    private Integer deviceStandbyModel;

//    private Date createTime;
//
//    private Date updateTime;

    private String deviceDescription;

//    private Integer devicType; //不应该传入，由程序控制

//    private Integer deviceIsNew;

    private String clSqS;

    private Integer deviceClientUpgradeState;

    private Integer deviceClusterIdentity;

    @NotNull(message = "设备硬件信息不能为空")
    @Pattern(regexp = "((25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))\\.){3}(25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))", message = "设备信息格式不是合法json字符串")
    private String deviceHardInfo;

    private Integer devicePort;

//    private Integer concurrencyCount;

    private Integer deviceInstallType;

//    private String targetclientUrl;

    private Integer deviceInstallId;
}
